import axios from 'axios';

//axios用来发送异步请求
axios.defaults.withCredentials=true

axios.defaults.headers['X-Request-With']='XMLHttpREquest'
axios.defaults.headers['token']=sessionStorage.getItem("token")

axios.defaults.headers.post['Content-Type']='application/json'

axios.interceptors.response.use(res=>{
    return res.data;
})
export default axios